<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
//后台
Route::get('login', 'LoginController@show');//登陆
Route::post('action', 'LoginController@action');//提交登录
Route::get('loginOut', 'LoginController@loginOut');//退出登录
Route::get('index_xy','UploadController@index_cy');


Route::middleware('CheckAdminLogin')->group(function () {
    Route::get('/', 'IndexController@index');//根
    Route::get('home', 'IndexController@home');//首页

    //管理员管理
    Route::prefix('admin')->group(function () {
        Route::get('index', 'AdminController@index');//管理员列表
        Route::post('add', 'AdminController@add');//添加页
        Route::post('insert', 'AdminController@insert');//添加操作
        Route::post('edit', 'AdminController@edit');//编辑页
        Route::post('update', 'AdminController@update');//编辑操作
        Route::post('del', 'AdminController@del');//删除
        Route::post('personal', 'AdminController@personal');//个人资料页
        Route::post('personal/up', 'AdminController@personalUp');//个人资料修改操作
        Route::post('up_state', 'AdminController@up_state');//启用禁用
        Route::get('log', 'AdminController@logList');//管理员日志
    });
    //角色管理
    Route::prefix('role')->group(function () {
        Route::get('index', 'RolesController@index');//角色列表
        Route::get('add', 'RolesController@add');//添加页
        Route::post('insert', 'RolesController@insert');//添加操作
        Route::get('edit', 'RolesController@edit');//编辑页
        Route::post('update', 'RolesController@update');//编辑操作
        Route::post('del', 'RolesController@del');//删除
    });
    //用户管理
    Route::prefix('user')->group(function () {
        Route::get('index', 'UserController@index');//用户列表
        Route::post('up_state', 'UserController@up_state');//用户(启用/禁用)
        Route::get('team', 'UserController@team');//查看团队体系
        Route::post('team_list', 'UserController@team_list');//查看团队体系
		Route::get('account', 'UserController@account');//资产调整
		Route::post('account_update', 'UserController@account_update');//资产调整
		Route::get('account_log', 'UserController@account_log');//资产调整
		Route::get('create', 'UserController@user_create');//资产调整
		Route::post('create', 'UserController@user_store');//资产调整
	});
    //分类管理
    Route::prefix('type')->group(function () {
		Route::get('index', 'TypeController@index');//分类列表
		Route::post('add', 'TypeController@add');//添加分类
		Route::post('insert', 'TypeController@insert');//添加分类
		Route::post('add_son', 'TypeController@add_son');//添加子分类
		Route::post('edit', 'TypeController@edit');//编辑分类
		Route::post('update', 'TypeController@update');//编辑分类
		Route::post('del', 'TypeController@del');//删除分类
	});

    //商品管理
	Route::prefix('shop')->group(function () {
		Route::get('index', 'ShopController@index');//商品列表
		Route::get('index_two', 'ShopController@index_two');//商品列表
		Route::any('add', 'ShopController@add');//添加商品
		Route::post('insert', 'ShopController@insert');//添加商品
		Route::any('edit', 'ShopController@edit');//编辑商品
		Route::post('update', 'ShopController@update');//编辑商品
		Route::post('del', 'ShopController@del');//删除商品
		Route::post('up_state','ShopController@up_state');//更改商品的上架下架
		Route::post('up_wish','ShopController@up_wish');//更改商品的心愿单开关
		Route::get('pic_other','ShopController@pic_other');//查看其余主图
		Route::post('pic_add','ShopController@pic_add');//查看其余主图
		Route::post('pic_del','ShopController@pic_del');//删除其余主图
        Route::any('label','ShopController@label');//标签管理页
		Route::any('label_update','ShopController@label_update');//标签管理操作
		Route::any('q_a_store','ShopController@q_a_store');//标签管理操作
		Route::post('add_q','ShopController@add_q');//添加问答
		Route::post('insert_q','ShopController@insert_q');//添加问答
		Route::post('edit_q','ShopController@edit_q');//添加问答
		Route::post('update_q','ShopController@update_q');//添加问答
		Route::post('delete_q','ShopController@delete_q');//删除问答
		Route::get('source','ShopController@source');//素材库
		Route::post('sourcepic_add','ShopController@sourcepic_add');//素材库
		Route::any('source_add','ShopController@source_add');//添加素材库页
		Route::post('source_edit','ShopController@source_edit');//编辑素材库加载页
		Route::post('source_update','ShopController@source_update');//编辑素材库
		Route::any('source_other','ShopController@source_other');//添加素材库页
		Route::post('sourpic_del','ShopController@sourpic_del');//删除素材库图片
		Route::post('source_insert','ShopController@source_insert');//添加素材库
		Route::post('source_del','ShopController@source_del');//删除素材库
		Route::post('edit_state','ShopController@edit_state');//编辑状态
		Route::post('edit_mpic','ShopController@edit_mpic');//编辑商品主图
		Route::post('update_mpic','ShopController@update_mpic');//编辑商品主图
		Route::get('qanda_add','ShopController@qanda_add');
		Route::post('qanda_insert','ShopController@qanda_insert');
		Route::post('qanda_update','ShopController@qanda_update');
		Route::any('update_title','ShopController@update_title');//编辑商品销售标题
		Route::any('update_name','ShopController@update_name');//编辑商品名称
		Route::post('del_ids','ShopController@del_ids');
		Route::post('source_add_qanda','ShopController@source_add_qanda');//商品添加素材问答
		Route::post('source_insert_qanda','ShopController@source_insert_qanda');//商品添加素材问答
		Route::post('delete_qanda','ShopController@delete_qanda');//删除问答
		Route::get('son_list','ShopController@son_list');//子商品列表
		Route::post('son_update_id','ShopController@son_update_id');//编辑子商品的货源ID
		Route::post('son_delete','ShopController@son_delete');//删除子商品
		Route::post('source_add_vedio','ShopController@source_add_vedio');//添加视频
		Route::post('sorts_paixu','ShopController@sorts_paixu');//更改商品排序             1
		Route::post('shop_label_up','ShopLabelController@shop_label_up');//上传标签图片   1
	});

	//素材管理
	Route::prefix('source')->group(function(){
		Route::get('index_pic', 'SourceController@index_pic');//图文列表
		Route::post('update_sort','SourceController@update_sort');//编辑素材排列顺序
		Route::post('pic_edit','SourceController@pic_edit');//编辑素材图文  加载页
		Route::post('pic_update','SourceController@pic_update');//编辑素材图文

		Route::any('index_vedio','SourceController@index_vedio');//视频列表
		Route::post('vedio_edit_title','SourceController@vedio_edit_title');//编辑素材视频  标题
		Route::post('vedio_edit_pic','SourceController@vedio_edit_pic');//编辑素材视频主图 加载页
		Route::post('vedio_update_pic','SourceController@vedio_update_pic');//编辑素材视频主图
	});
    //规格类型
    Route::prefix('attrtype')->group(function () {
        Route::get('index', 'ShopAttrTypeController@index');//规格类型列表
        Route::post('add', 'ShopAttrTypeController@add');//添加页
        Route::post('insert', 'ShopAttrTypeController@insert');//添加
        Route::post('edit', 'ShopAttrTypeController@edit');//修改页
        Route::post('update', 'ShopAttrTypeController@update');//修改

        Route::any('add_xzattr', 'ShopAttrTypeController@add_xzattr');//选择添加规格页
        Route::any('insert_xzattr', 'ShopAttrTypeController@insert_xzattr');//选择添加规格
        Route::any('xzattr_value', 'ShopAttrTypeController@xzattr_value');//选择规格后规格属性展示
        Route::any('update_xzattr', 'ShopAttrTypeController@update_xzattr');//修改选择添加规格
        
    });

    //规格名
    Route::prefix('attrkey')->group(function () {
        Route::get('index', 'ShopAttrKeyController@index');//规格名列表
        Route::post('add', 'ShopAttrKeyController@add');//添加页
        Route::post('insert', 'ShopAttrKeyController@insert');//添加
        Route::post('edit', 'ShopAttrKeyController@edit');//修改页
        Route::post('update', 'ShopAttrKeyController@update');//修改

    });

    //规格值
    Route::prefix('attrval')->group(function () {
        Route::any('index', 'ShopAttrValController@index');//规格名列表
        Route::post('add', 'ShopAttrValController@add');//添加页
        Route::post('insert', 'ShopAttrValController@insert');//添加
        Route::post('edit', 'ShopAttrValController@edit');//修改页
        Route::post('update', 'ShopAttrValController@update');//修改
        Route::post('del', 'ShopAttrValController@del');//删除
        
    });

    //品牌管理
    Route::prefix('shopbrand')->group(function(){
        Route::any('index', 'ShopBrandController@index');//品牌列表
        Route::post('add', 'ShopBrandController@add');//根品牌添加页
        Route::post('insert', 'ShopBrandController@insert');//根品牌添加

		Route::post('edit','ShopBrandController@edit');
		Route::post('update','ShopBrandController@update');

        Route::post('add_son', 'ShopBrandController@add_son');//根品牌添加页
        Route::post('insert_son', 'ShopBrandController@insert_son');//根品牌添加
        Route::post('del', 'ShopBrandController@del');//品牌删除

    });


    //标签管理
    Route::prefix('shoplabel')->group(function(){
        Route::any('index', 'ShopLabelController@index');//标签列表
        Route::post('add', 'ShopLabelController@add');//标签添加页
        Route::any('insert', 'ShopLabelController@insert');//标签添加
        Route::post('edit', 'ShopLabelController@edit');//修改页
        Route::post('update', 'ShopLabelController@update');//修改页
        Route::post('del', 'ShopLabelController@del');//标签删除
		Route::any('up_state', 'ShopLabelController@up_state');//标签删除
		Route::any('edit_mpic','ShopLabelController@edit_mpic');//编辑图片        1
		Route::any('update_mpic','ShopLabelController@update_mpic');//编辑图片    1
    });

	//商城入口类型
	Route::prefix('shophome')->group(function(){
		Route::any('index', 'ShopHomeController@index');//商城首页入口类别
		Route::post('add', 'ShopHomeController@add');//添加页
		Route::any('insert', 'ShopHomeController@insert');//添加
		Route::post('edit', 'ShopHomeController@edit');//修改页
		Route::post('update', 'ShopHomeController@update');//修改页
		Route::post('del', 'ShopHomeController@del');//删除
		Route::any('up_state', 'ShopHomeController@up_state');//删除
		Route::any('update_sort', 'ShopHomeController@update_sort');//更改排序
		Route::any('search','ShopHomeController@search');//搜索关键字首页
		Route::post('search_add','ShopHomeController@search_add');//添加页面
		Route::post('search_insert','ShopHomeController@search_insert');//添加搜索关键字
		Route::post('search_del','ShopHomeController@search_del');

	});

	//数据统计
	Route::prefix('total')->group(function(){
		Route::any('index', 'TotalController@index');//数据统计列表
		Route::post('up_state', 'TotalController@up_state');//更改状态
		Route::post('update', 'TotalController@update');//更改状态
	});

    //商品规格
    Route::prefix('sku')->group(function(){
        Route::any('index', 'SkuController@index');//规格列表
        Route::any('sku_lists', 'SkuController@sku_lists');//规格列表
		Route::any('add', 'SkuController@add');//添加规格
		Route::any('sku_add', 'SkuController@sku_add');//添加规格信息
		Route::any('sku_edit', 'SkuController@sku_edit');//添加规格信息
		Route::any('sku_update', 'SkuController@sku_update');//添加规格信息
		Route::any('sku_del', 'SkuController@sku_del');//添加规格信息
		Route::post('edit_skupic','SkuController@edit_skupic');//编辑规格组合
		Route::post('update_skupic','SkuController@update_skupic');//编辑规格组合

    });
	Route::post('upload', 'UploadController@index');//上传分类图
	Route::post('shop_up', 'UploadController@shop_up');//上传商品图
	Route::post('logo_up', 'UploadController@logo_up');//上传银行背景图
	Route::post('label_up', 'UploadController@label_up');//上传标签图
	Route::post('qrcode_up', 'UploadController@qrcode_up');//上传联系方式二维码图
	Route::post('source_up', 'UploadController@source_up');//上传资源封面图
	Route::post('source_ve', 'ShopController@source_ve');//上传视频
	Route::post('shop_editor', 'UploadController@shop_editor');//商品添加富文本编辑器的图片
	Route::post('banner_up', 'UploadController@banner_up');//商品添加富文本编辑器的图片
	Route::post('goods_up', 'UploadController@goods_up');//商品其余主图


	//提现方式背景(增删改查)
	Route::prefix('paytype')->group(function(){
		//提现方式背景图
		Route::any('index','PayTypeController@index');
		//添加
		Route::any('add','PayTypeController@add');
		Route::post('insert','PayTypeController@insert');

		//编辑
		Route::any('edit','PayTypeController@edit');
		Route::post('update','PayTypeController@update');
		//删除
		Route::post('del','PayTypeController@del');
	});

	//云仓库
	Route::prefix('store')->group(function(){
		//云仓库列表
		Route::any('index','StoreController@index');

	});

	//banner
	Route::prefix('banner')->group(function(){
		//banner首页
		Route::get('index','BannerController@index');
		//添加banner
		Route::post('add','BannerController@add');
		Route::post('insert','BannerController@insert');
		//删除
		Route::post('del','BannerController@del');
		//排序
		Route::post('sort','BannerController@sort');
		Route::post('do_sort','BannerController@do_sort');
		Route::post('up_state','BannerController@up_state');
	});

	//实名认证审核
	Route::prefix('auth')->group(function(){
		//实名认证列表
		Route::any('index','AuthController@index');
		//审核(通过)
		Route::post('auth_ok','AuthController@auth_ok');
		//审核(驳回)
		Route::post('auth_no','AuthController@auth_no');
		Route::post('auth_no_remark','AuthController@auth_no_remark');
		//编辑驳回原因
		Route::post('edit','AuthController@edit');
	});
	//客服中心
	Route::prefix('asd')->group(function(){
		//实名认证列表
		Route::any('index','AsdController@index');
		//添加客服
		Route::post('add','AsdController@add');
		Route::post('insert','AsdController@insert');
		//删除
		Route::post('del','AsdController@del');
	});

	//心愿管理
	Route::prefix('wish')->group(function(){
		//系统参数首页
		Route::any('index','WishController@index');
		//发货
		Route::post('send_ok','WishController@send_ok');
		//发货
		Route::post('send_ok_cy','WishController@send_ok_cy');
		//心愿列表
		Route::get('list','WishController@list');
	});


	//参数配置
	Route::prefix('config')->group(function(){
		//系统参数首页
		Route::any('index','ConfigController@index');
		Route::any('update','ConfigController@update');
	});

	// 列表
	Route::get('/notice/index', 'NoticeController@index');
	// 排序
	Route::post('/notice/update_sort', 'NoticeController@update_sort');
	// 修改状态
	Route::get('/notice/change_state', 'NoticeController@change_state');
	// 添加
	Route::get('/notice/create', 'NoticeController@create');
	Route::post('/notice/store', 'NoticeController@store');
	// 修改
	Route::get('/notice/edit', 'NoticeController@edit');
	Route::post('/notice/update', 'NoticeController@update');
	// 删除
	Route::any('/notice/del', 'NoticeController@del');
	//公告富文本编辑器上传图片
	Route::post('/notice/upload','NoticeController@upload');

	//商品订单
	Route::prefix('order')->group(function(){
		//订单列表
		Route::any('index','OrderController@index');
		//子订单
		Route::any('son_order','OrderController@sn_order');
		//订单详情
		Route::any('detail','OrderController@detail');
		//发货
		Route::post('send','OrderController@send');
	});

	//提现管理
	Route::prefix('deposit')->group(function(){
		//提现列表
		Route::any('index','DepositController@index');
		//审核
		Route::post('auth_ok','DepositController@auth_ok');
		//审核(驳回)
		Route::post('auth_no','DepositController@auth_no');
		Route::post('auth_no_remark','DepositController@auth_no_remark');
		Route::post('auth_ok_check','DepositController@auth_ok_check');
	});

	//拼团管理
	Route::prefix('group')->group(function(){
		//拼团页面
		Route::any('index','GroupController@index');//  1
		Route::any('add','GroupController@add');   // 1
		Route::post('insert','GroupController@insert');   // 1
		Route::post('up_state','GroupController@up_state');  //1
		Route::get('in_team','GroupController@in_team'); // 1
		Route::get('order','GroupController@order'); // 1
		Route::get('cite','GroupController@cite'); // 1
		Route::get('cite_log','GroupController@cite_log'); // 1
		Route::post('send_ok','GroupController@send_ok'); // 
		Route::post('send_ok_cy','GroupController@send_ok_cy'); // 1
	});



	// 消息通知
	Route::get('/information/index', 'NoticeController@information');
	Route::get('/information/create', 'NoticeController@information_create');
	Route::post('/information/store', 'NoticeController@information_store');
	Route::get('/information/detail', 'NoticeController@detail');
	Route::post('/information/userinfo', 'NoticeController@userinfo');

});